<!DOCTYPE html>
<html>
<head>
    

    

    



    <meta charset="utf-8">
    
    
    
    
    <title>Centos7安装Nginx | 写作之路</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="Centos,b,c">
    <meta name="description" content="Centos7安装nginx详解">
<meta name="keywords" content="Centos,b,c">
<meta property="og:type" content="website">
<meta property="og:title" content="Centos7安装Nginx">
<meta property="og:url" content="https://e9ab98e991ab.github.io/custom/Centos7.4搭建Nginx.html">
<meta property="og:site_name" content="写作之路">
<meta property="og:description" content="Centos7安装nginx详解">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2018-06-14T02:39:42.681Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Centos7安装Nginx">
<meta name="twitter:description" content="Centos7安装nginx详解">
    
        <link rel="alternate" type="application/atom+xml" title="写作之路" href="/atom.xml">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">godfeer</h5>
          <a href="mailto:godfeer@aliyun.com" title="godfeer@aliyun.com" class="mail">godfeer@aliyun.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                主页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                Archives
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                Tags
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/categories"  >
                <i class="icon icon-lg icon-th-list"></i>
                Categories
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/e9ab98e991ab" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://weibo.com/2134523903/profile?rightmod=1&wvr=6&mod=personinfo" target="_blank" >
                <i class="icon icon-lg icon-weibo"></i>
                Weibo
              </a>
            </li>
        
            <li class="waves-block waves-effect active">
              <a href="/custom"  >
                <i class="icon icon-lg icon-link"></i>
                我的文章
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">Centos7安装Nginx</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="Search">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header page-header">

    <div class="container fade-scale">
        <h1 class="title">Centos7安装Nginx</h1>
        <h5 class="subtitle">
            
                Centos7安装nginx详解
            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    <article class="page-article fade" itemprop="blogPage">
        <div class="post-content page-content" id="page-content" itemprop="pageContent">
            <h2 id="第一种方式：通过yum安装"><a href="#第一种方式：通过yum安装" class="headerlink" title="第一种方式：通过yum安装"></a>第一种方式：通过yum安装</h2><blockquote>
<p>直接通过 yum install nginx 肯定是不行的,因为yum没有nginx，所以首先把 nginx 的源加入 yum 中。</p>
</blockquote>
<p>运行下面的命令:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br></pre></td><td class="code"><pre><span class="line">1.将nginx放到yum repro库中</span><br><span class="line">[root@localhost ~]# rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm</span><br><span class="line"></span><br><span class="line">2.查看nginx信息</span><br><span class="line">[root@localhost ~]# yum info nginx</span><br><span class="line"></span><br><span class="line">3.使用yum安装ngnix</span><br><span class="line">[root@localhost ~]# yum install nginx</span><br><span class="line">效果如下：</span><br><span class="line">[root@localhost ~]# yum install nginx</span><br><span class="line">已加载插件：fastestmirror, langpacks</span><br><span class="line">Loading mirror speeds from cached hostfile</span><br><span class="line"> * base: mirrors.usc.edu</span><br><span class="line"> * extras: mirror.raystedman.net</span><br><span class="line"> * updates: mirror.metrocast.net</span><br><span class="line">正在解决依赖关系</span><br><span class="line">--&gt; 正在检查事务</span><br><span class="line">---&gt; 软件包 nginx.x86_64.1.1.10.1-1.el7.ngx 将被 安装</span><br><span class="line">      ······</span><br><span class="line">      ······</span><br><span class="line">正在安装    : 1:nginx-1.10.1-1.el7.ngx.x86_64        </span><br><span class="line">Thanks for using nginx!</span><br><span class="line">Please find the official documentation for nginx here:</span><br><span class="line">* http://nginx.org/en/docs/</span><br><span class="line"></span><br><span class="line">Commercial subscriptions for nginx are available on:</span><br><span class="line">* http://nginx.com/products/</span><br><span class="line"></span><br><span class="line">----------------------------------------------------------------------</span><br><span class="line">  验证中      : 1:nginx-1.10.1-1.el7.ngx.x86_64                                                                                 1/1 </span><br><span class="line"></span><br><span class="line">已安装:</span><br><span class="line">  nginx.x86_64 1:1.10.1-1.el7.ngx                                                                                     </span><br><span class="line">完毕！</span><br><span class="line"></span><br><span class="line">4.启动nginx</span><br><span class="line">[root@localhost ~]# service nginx start</span><br><span class="line"></span><br><span class="line">5.查看nginx版本</span><br><span class="line">[root@localhost ~]# nginx -v</span><br><span class="line"></span><br><span class="line">6.访问nginx，现在你可以通过公网ip (本地可以通过 localhost /或 127.0.0.1 ) 查看nginx 服务返回的信息。</span><br><span class="line">[root@localhost ~]# curl -i localhost</span><br><span class="line">效果如下：</span><br><span class="line">      ······</span><br><span class="line">Welcome to nginx!。</span><br><span class="line">      ······</span><br><span class="line">7.nginx配置文件位置在/etc/nginx/</span><br><span class="line">[root@localhost /]# ll /etc/nginx/</span><br><span class="line">总用量 32</span><br><span class="line">drwxr-xr-x. 2 root root   25 10月 12 13:11 conf.d</span><br><span class="line">-rw-r--r--. 1 root root 1007 5月  31 22:09 fastcgi_params</span><br><span class="line">-rw-r--r--. 1 root root 2837 5月  31 22:09 koi-utf</span><br><span class="line">-rw-r--r--. 1 root root 2223 5月  31 22:09 koi-win</span><br><span class="line">-rw-r--r--. 1 root root 3957 5月  31 22:09 mime.types</span><br><span class="line">lrwxrwxrwx. 1 root root   29 10月 12 13:11 modules -&gt; ../../usr/lib64/nginx/modules</span><br><span class="line">-rw-r--r--. 1 root root  643 5月  31 22:08 nginx.conf</span><br><span class="line">-rw-r--r--. 1 root root  636 5月  31 22:09 scgi_params</span><br><span class="line">-rw-r--r--. 1 root root  664 5月  31 22:09 uwsgi_params</span><br><span class="line">-rw-r--r--. 1 root root 3610 5月  31 22:09 win-utf</span><br><span class="line"></span><br><span class="line">8.实践：</span><br><span class="line">目的：修改服务名，接着从外部访问这个服务</span><br><span class="line">操作：</span><br><span class="line">a.修改nginx配置文件</span><br><span class="line">[root@localhost nginx]# vim /etc/nginx/conf.d/default.conf</span><br><span class="line">修改server_name部分：server_name  yytest.com;</span><br><span class="line"></span><br><span class="line">b.重载服务</span><br><span class="line">[root@localhost nginx]# /usr/sbin/nginx -s reload </span><br><span class="line"></span><br><span class="line">c.从外部访问nginx服务(192.168.10.11)</span><br><span class="line">如在客户机(192.168.10.10)的浏览器访问：http://yytest.com</span><br><span class="line"></span><br><span class="line">d.你发现访问不了，原因1，你没有在hosts文件做映射；原因2，及时你在hosts文件中了映射，由于nginx服务器的80端口堵塞或防火墙没关</span><br><span class="line"></span><br><span class="line">e.解决办法：</span><br><span class="line">步骤一：修改客户机(192.168.10.10)的hosts文件，使用SwitchHosts工具添加 192.168.10.11     yytest.com</span><br><span class="line">步骤二：关闭防火墙，具体下文有说明</span><br><span class="line"></span><br><span class="line">9.nginx常用操作</span><br><span class="line">启动:</span><br><span class="line">$ /usr/sbin/nginx或任意路径下运行service nginx start(centos7是systemctl start nginx.service )</span><br><span class="line"></span><br><span class="line">重启：</span><br><span class="line">$ /usr/sbin/nginx –s reload</span><br><span class="line"></span><br><span class="line">停止：</span><br><span class="line">$ /usr/sbin/nginx –s stop</span><br><span class="line"></span><br><span class="line">测试配置文件是否正常：</span><br><span class="line">$ /usr/sbin/nginx –t</span><br><span class="line">123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293</span><br></pre></td></tr></table></figure>
<h4 id="可能遇到的问题"><a href="#可能遇到的问题" class="headerlink" title="可能遇到的问题:"></a>可能遇到的问题:</h4><blockquote>
<p>具体情况如下<br>1。本机能ping通虚拟机<br>2。虚拟机也能ping通本机<br>3。虚拟机能访问自己的web<br>4。本机无法访问虚拟己的web<br>这个问题的原因是服务器的80端口没有打开或防火墙没有关闭</p>
</blockquote>
<h4 id="解决办法"><a href="#解决办法" class="headerlink" title="解决办法"></a>解决办法</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line">如果是centos6:</span><br><span class="line">解决方法如下： </span><br><span class="line">/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT </span><br><span class="line">然后保存： </span><br><span class="line">/etc/rc.d/init.d/iptables save </span><br><span class="line">重启防火墙 </span><br><span class="line">/etc/init.d/iptables restart </span><br><span class="line"></span><br><span class="line">CentOS防火墙的关闭，关闭其服务即可： </span><br><span class="line">查看CentOS防火墙信息：/etc/init.d/iptables status </span><br><span class="line">关闭CentOS防火墙服务：/etc/init.d/iptables stop </span><br><span class="line">永久关闭防火墙： </span><br><span class="line">chkconfig –level 35 iptables off</span><br><span class="line"></span><br><span class="line">如果是centos7</span><br><span class="line">[root@rhel7 ~]# systemctl status firewalld.service</span><br><span class="line"></span><br><span class="line">[root@rhel7 ~]# systemctl stop firewalld.service</span><br><span class="line"></span><br><span class="line">[root@rhel7 ~]# systemctl disable firewalld.service</span><br><span class="line"></span><br><span class="line">[root@rhel7 ~]# systemctl status firewalld.service</span><br><span class="line">1234567891011121314151617181920212223</span><br></pre></td></tr></table></figure>
<h4 id="扩展知识："><a href="#扩展知识：" class="headerlink" title="扩展知识："></a>扩展知识：</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">启动一个服务：systemctl start firewalld.service</span><br><span class="line">关闭一个服务：systemctl stop firewalld.service</span><br><span class="line">重启一个服务：systemctl restart firewalld.service</span><br><span class="line">显示一个服务的状态：systemctl status firewalld.service</span><br><span class="line">在开机时启用一个服务：systemctl enable firewalld.service</span><br><span class="line">在开机时禁用一个服务：systemctl disable firewalld.service</span><br><span class="line"></span><br><span class="line">查看服务是否开机启动：systemctl is-enabled firewalld.service;echo $?</span><br><span class="line"></span><br><span class="line">查看已启动的服务列表：systemctl list-unit-files|grep enabled12345678910</span><br></pre></td></tr></table></figure>
<h2 id="第二种方式：通过手动下载安装包解压安装"><a href="#第二种方式：通过手动下载安装包解压安装" class="headerlink" title="第二种方式：通过手动下载安装包解压安装"></a>第二种方式：通过手动下载安装包解压安装</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">1.下载nginx包。</span><br><span class="line">[root@localhost ~]# wget http://nginx.org/download/nginx-1.10.1.tar.gz</span><br><span class="line"></span><br><span class="line">2.复制包到你的安装目录</span><br><span class="line">[root@localhost ~]# cp nginx-1.10.1.tar.gz /usr/local/</span><br><span class="line"></span><br><span class="line">3.解压</span><br><span class="line">[root@localhost ~]# tar -zxvf nginx-1.10.1.tar.gz</span><br><span class="line">[root@localhost ~]# cd nginx-1.10.1</span><br><span class="line"></span><br><span class="line">4.启动nginx</span><br><span class="line">[root@localhost ~]# /usr/local/nginx/sbin/nginx</span><br><span class="line"></span><br><span class="line">5.查看版本s</span><br><span class="line">[root@localhost ~]# nginx -v</span><br><span class="line"></span><br><span class="line">6.url访问nginx localhost或127.0.0.1</span><br></pre></td></tr></table></figure>
        </div>

        
        <div class="card page-about-me flex-row">
            <a href="/" class="avatar waves-effect waves-circle waves-light"><img src="/img/avatar.jpg"></a>
            <div class="content flex-col">
                <p><strong>godfeer</strong></p>
                <p><em></em></p>
                <p>用户页面中作者相关的描述性文字，如不需要设为 false</p>
            </div>

            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://e9ab98e991ab.github.io/custom/Centos7.4搭建Nginx.html&title=《Centos7安装Nginx》 — 写作之路&pic=https://e9ab98e991ab.github.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://e9ab98e991ab.github.io/custom/Centos7.4搭建Nginx.html&title=《Centos7安装Nginx》 — 写作之路&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://e9ab98e991ab.github.io/custom/Centos7.4搭建Nginx.html" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《Centos7安装Nginx》 — 写作之路&url=https://e9ab98e991ab.github.io/custom/Centos7.4搭建Nginx.html&via=https://e9ab98e991ab.github.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://e9ab98e991ab.github.io/custom/Centos7.4搭建Nginx.html" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
        

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        

















    </article>
    
<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        谢谢大爷~
        <i class="icon icon-quote-right"></i>
    </h3>
    <div class="reward-content">
        
        <div class="reward-code">
            <img id="rewardCode" src="/img/wechat.jpg" alt="打赏二维码">
        </div>
        
        <label class="reward-toggle">
            <input id="rewardToggle" type="checkbox" class="reward-toggle-check"
                data-wechat="/img/wechat.jpg" data-alipay="/img/alipay.jpg">
            <div class="reward-toggle-ctrol">
                <span class="reward-toggle-item wechat">微信</span>
                <span class="reward-toggle-label"></span>
                <span class="reward-toggle-item alipay">支付宝</span>
            </div>
        </label>
        
    </div>
</div>


</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
                <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            
            <span>This blog is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.</span>
        </p>
    </div>
    <div class="bottom">
        <p><span>godfeer &copy; 2015 - 2018</span>
            <span>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://e9ab98e991ab.github.io/custom/Centos7.4搭建Nginx.html&title=《Centos7安装Nginx》 — 写作之路&pic=https://e9ab98e991ab.github.io/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://e9ab98e991ab.github.io/custom/Centos7.4搭建Nginx.html&title=《Centos7安装Nginx》 — 写作之路&source=" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://e9ab98e991ab.github.io/custom/Centos7.4搭建Nginx.html" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《Centos7安装Nginx》 — 写作之路&url=https://e9ab98e991ab.github.io/custom/Centos7.4搭建Nginx.html&via=https://e9ab98e991ab.github.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://e9ab98e991ab.github.io/custom/Centos7.4搭建Nginx.html" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=https://e9ab98e991ab.github.io/custom/Centos7.4搭建Nginx.html" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: true };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>






<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>



<script>
(function() {
    var OriginTitile = document.title, titleTime;
    document.addEventListener('visibilitychange', function() {
        if (document.hidden) {
            document.title = '死鬼去哪里了！';
            clearTimeout(titleTime);
        } else {
            document.title = '(つェ⊂)咦!又好了!';
            titleTime = setTimeout(function() {
                document.title = OriginTitile;
            },2000);
        }
    });
})();
</script>



</body>
</html>
